# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Firebase.V1beta1.Model.StreamMapping do
  @moduledoc """
  A mapping of a Firebase App to a Google Analytics data stream

  ## Attributes

  *   `app` (*type:* `String.t`, *default:* `nil`) - The resource name of the Firebase App associated with the Google Analytics data stream, in the format: projects/PROJECT_IDENTIFIER/androidApps/APP_ID or projects/PROJECT_IDENTIFIER/iosApps/APP_ID or projects/PROJECT_IDENTIFIER /webApps/APP_ID Refer to the `FirebaseProject` [`name`](../projects#FirebaseProject.FIELDS.name) field for details about PROJECT_IDENTIFIER values.
  *   `measurementId` (*type:* `String.t`, *default:* `nil`) - Applicable for Firebase Web Apps only. The unique Google-assigned identifier of the Google Analytics web stream associated with the Firebase Web App. Firebase SDKs use this ID to interact with Google Analytics APIs. Learn more about this ID and Google Analytics web streams in the [Analytics documentation](https://support.google.com/analytics/answer/9304153).
  *   `streamId` (*type:* `String.t`, *default:* `nil`) - The unique Google-assigned identifier of the Google Analytics data stream associated with the Firebase App. Learn more about Google Analytics data streams in the [Analytics documentation](https://support.google.com/analytics/answer/9303323).
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :app => String.t() | nil,
          :measurementId => String.t() | nil,
          :streamId => String.t() | nil
        }

  field(:app)
  field(:measurementId)
  field(:streamId)
end

defimpl Poison.Decoder, for: GoogleApi.Firebase.V1beta1.Model.StreamMapping do
  def decode(value, options) do
    GoogleApi.Firebase.V1beta1.Model.StreamMapping.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Firebase.V1beta1.Model.StreamMapping do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
